package com.lvtn.adsonandroid;


import com.lvtn.adsonandroid.R;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class ManageActivity extends Fragment {
	
//	public final static String EXTRA_MESSAGE = "com.example.android.MESSAGE";
	static final String EXTRA_MESSAGE = "nothing";
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		View rootView = inflater.inflate(R.layout.activity_manage, container, false);
		final String data = getActivity().getIntent().getStringExtra(LoginActivity.EXTRA_MESSAGE);
		rootView.findViewById(R.id.private_information)
		.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), AccessPrivateInforActivity.class);
                intent.putExtra(EXTRA_MESSAGE, data);
                startActivity(intent);
            }
        });
		rootView.findViewById(R.id.new_ad)
		.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), PostNews.class);
                intent.putExtra(EXTRA_MESSAGE, data);
                startActivity(intent);
            }
        }); 
		rootView.findViewById(R.id.published_ads)
		.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), PublishedAdsActivity.class);
                intent.putExtra(EXTRA_MESSAGE, data);
                startActivity(intent);
            }
        }); 
		rootView.findViewById(R.id.follower_ads)
		.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), FollowerActivity.class);
                intent.putExtra(EXTRA_MESSAGE, data);
                startActivity(intent);
            }
        }); 
		rootView.findViewById(R.id.change_password)
		.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), ChangePasswordActivity.class);
                intent.putExtra(EXTRA_MESSAGE, data);
                startActivity(intent);
            }
        }); 
		return rootView;
	}
}
